3.343 \(\int \frac{\cos ^2(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx\)
Optimal. Leaf size=538 \[ -\frac{\left (-146 a^4 A b^3+167 a^2 A b^5+24 a^6 A b+65 a^5 b^2 B-68 a^3 b^4 B-6 a^7 B+24 a b^6 B-60 A b^7\right ) \sin (c+d x)}{6 a^5 d \left (a^2-b^2\right )^3}+\frac{\left (-23 a^4 A b^2+27 a^2 A b^4+a^6 A-11 a^3 b^3 B+12 a^5 b B+4 a b^5 B-10 A b^6\right ) \sin (c+d x) \cos (c+d x)}{2 a^4 d \left (a^2-b^2\right )^3}-\frac{b^2 \left (-84 a^4 A b^3+69 a^2 A b^5+40 a^6 A b+35 a^5 b^2 B-28 a^3 b^4 B-20 a^7 B+8 a b^6 B-20 A b^7\right ) \tanh ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{a^6 d (a-b)^{7/2} (a+b)^{7/2}}+\frac{b \left (-53 a^2 A b^3+48 a^4 A b+20 a^3 b^2 B-27 a^5 B-8 a b^4 B+20 A b^5\right ) \sin (c+d x) \cos (c+d x)}{6 a^3 d \left (a^2-b^2\right )^3 (a+b \sec (c+d x))}+\frac{b \left (10 a^2 A b-7 a^3 B+2 a b^2 B-5 A b^3\right ) \sin (c+d x) \cos (c+d x)}{6 a^2 d \left (a^2-b^2\right )^2 (a+b \sec (c+d x))^2}+\frac{b (A b-a B) \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}+\frac{x \left (a^2 A-8 a b B+20 A b^2\right )}{2 a^6} \]
[Out]
((a^2*A + 20*A*b^2 - 8*a*b*B)*x)/(2*a^6) - (b^2*(40*a^6*A*b - 84*a^4*A*b^3 + 69*a^2*A*b^5 - 20*A*b^7 - 20*a^7*
B + 35*a^5*b^2*B - 28*a^3*b^4*B + 8*a*b^6*B)*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(a^6*(a - b)
^(7/2)*(a + b)^(7/2)*d) - ((24*a^6*A*b - 146*a^4*A*b^3 + 167*a^2*A*b^5 - 60*A*b^7 - 6*a^7*B + 65*a^5*b^2*B - 6
8*a^3*b^4*B + 24*a*b^6*B)*Sin[c + d*x])/(6*a^5*(a^2 - b^2)^3*d) + ((a^6*A - 23*a^4*A*b^2 + 27*a^2*A*b^4 - 10*A
*b^6 + 12*a^5*b*B - 11*a^3*b^3*B + 4*a*b^5*B)*Cos[c + d*x]*Sin[c + d*x])/(2*a^4*(a^2 - b^2)^3*d) + (b*(A*b - a
*B)*Cos[c + d*x]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + (b*(10*a^2*A*b - 5*A*b^3 - 7*a^3*B
+ 2*a*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + (b*(48*a^4*A*b - 53*
a^2*A*b^3 + 20*A*b^5 - 27*a^5*B + 20*a^3*b^2*B - 8*a*b^4*B)*Cos[c + d*x]*Sin[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*
(a + b*Sec[c + d*x]))
________________________________________________________________________________________
Rubi [A] time = 6.84428, antiderivative size = 538, normalized size of antiderivative = 1.,
number of steps used = 9, number of rules used = 7, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.226, Rules used =
{4030, 4100, 4104, 3919, 3831, 2659, 208} \[ -\frac{\left (-146 a^4 A b^3+167 a^2 A b^5+24 a^6 A b+65 a^5 b^2 B-68 a^3 b^4 B-6 a^7 B+24 a b^6 B-60 A b^7\right ) \sin (c+d x)}{6 a^5 d \left (a^2-b^2\right )^3}+\frac{\left (-23 a^4 A b^2+27 a^2 A b^4+a^6 A-11 a^3 b^3 B+12 a^5 b B+4 a b^5 B-10 A b^6\right ) \sin (c+d x) \cos (c+d x)}{2 a^4 d \left (a^2-b^2\right )^3}-\frac{b^2 \left (-84 a^4 A b^3+69 a^2 A b^5+40 a^6 A b+35 a^5 b^2 B-28 a^3 b^4 B-20 a^7 B+8 a b^6 B-20 A b^7\right ) \tanh ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{a^6 d (a-b)^{7/2} (a+b)^{7/2}}+\frac{b \left (-53 a^2 A b^3+48 a^4 A b+20 a^3 b^2 B-27 a^5 B-8 a b^4 B+20 A b^5\right ) \sin (c+d x) \cos (c+d x)}{6 a^3 d \left (a^2-b^2\right )^3 (a+b \sec (c+d x))}+\frac{b \left (10 a^2 A b-7 a^3 B+2 a b^2 B-5 A b^3\right ) \sin (c+d x) \cos (c+d x)}{6 a^2 d \left (a^2-b^2\right )^2 (a+b \sec (c+d x))^2}+\frac{b (A b-a B) \sin (c+d x) \cos (c+d x)}{3 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}+\frac{x \left (a^2 A-8 a b B+20 A b^2\right )}{2 a^6} \]
Antiderivative was successfully verified.
[In]
Int[(Cos[c + d*x]^2*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^4,x]
[Out]
((a^2*A + 20*A*b^2 - 8*a*b*B)*x)/(2*a^6) - (b^2*(40*a^6*A*b - 84*a^4*A*b^3 + 69*a^2*A*b^5 - 20*A*b^7 - 20*a^7*
B + 35*a^5*b^2*B - 28*a^3*b^4*B + 8*a*b^6*B)*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(a^6*(a - b)
^(7/2)*(a + b)^(7/2)*d) - ((24*a^6*A*b - 146*a^4*A*b^3 + 167*a^2*A*b^5 - 60*A*b^7 - 6*a^7*B + 65*a^5*b^2*B - 6
8*a^3*b^4*B + 24*a*b^6*B)*Sin[c + d*x])/(6*a^5*(a^2 - b^2)^3*d) + ((a^6*A - 23*a^4*A*b^2 + 27*a^2*A*b^4 - 10*A
*b^6 + 12*a^5*b*B - 11*a^3*b^3*B + 4*a*b^5*B)*Cos[c + d*x]*Sin[c + d*x])/(2*a^4*(a^2 - b^2)^3*d) + (b*(A*b - a
*B)*Cos[c + d*x]*Sin[c + d*x])/(3*a*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + (b*(10*a^2*A*b - 5*A*b^3 - 7*a^3*B
+ 2*a*b^2*B)*Cos[c + d*x]*Sin[c + d*x])/(6*a^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x])^2) + (b*(48*a^4*A*b - 53*
a^2*A*b^3 + 20*A*b^5 - 27*a^5*B + 20*a^3*b^2*B - 8*a*b^4*B)*Cos[c + d*x]*Sin[c + d*x])/(6*a^3*(a^2 - b^2)^3*d*
(a + b*Sec[c + d*x]))
Rule 4030
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*
(B_.) + (A_)), x_Symbol] :> Simp[(b*(A*b - a*B)*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n)/
(a*f*(m + 1)*(a^2 - b^2)), x] + Dist[1/(a*(m + 1)*(a^2 - b^2)), Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*
x])^n*Simp[A*(a^2*(m + 1) - b^2*(m + n + 1)) + a*b*B*n - a*(A*b - a*B)*(m + 1)*Csc[e + f*x] + b*(A*b - a*B)*(m
+ n + 2)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f, A, B, n}, x] && NeQ[A*b - a*B, 0] && NeQ[a^2 - b
^2, 0] && LtQ[m, -1] && !(ILtQ[m + 1/2, 0] && ILtQ[n, 0])
Rule 4100
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^
(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[((A*b^2 - a*b*B + a^2*C)*Cot[e + f*x]*(a +
b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n)/(a*f*(m + 1)*(a^2 - b^2)), x] + Dist[1/(a*(m + 1)*(a^2 - b^2)), I
nt[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n*Simp[a*(a*A - b*B + a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C)*
(m + n + 1) - a*(A*b - a*B + b*C)*(m + 1)*Csc[e + f*x] + (A*b^2 - a*b*B + a^2*C)*(m + n + 2)*Csc[e + f*x]^2, x
], x], x] /; FreeQ[{a, b, d, e, f, A, B, C, n}, x] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && !(ILtQ[m + 1/2, 0] &
& ILtQ[n, 0])
Rule 4104
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^
(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(A*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m +
1)*(d*Csc[e + f*x])^n)/(a*f*n), x] + Dist[1/(a*d*n), Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n + 1)*Simp[
a*B*n - A*b*(m + n + 1) + a*(A + A*n + C*n)*Csc[e + f*x] + A*b*(m + n + 2)*Csc[e + f*x]^2, x], x], x] /; FreeQ
[{a, b, d, e, f, A, B, C, m}, x] && NeQ[a^2 - b^2, 0] && LeQ[n, -1]
Rule 3919
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[(c*x)/a,
x] - Dist[(b*c - a*d)/a, Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[
b*c - a*d, 0]
Rule 3831
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[1/b, Int[1/(1 + (a*Sin[e
+ f*x])/b), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Rule 2659
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[(2*e)/d, Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]
Rule 208
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]
Rubi steps
\begin{align*} \int \frac{\cos ^2(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx &=\frac{b (A b-a B) \cos (c+d x) \sin (c+d x)}{3 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}-\frac{\int \frac{\cos ^2(c+d x) \left (-3 a^2 A+5 A b^2-2 a b B+3 a (A b-a B) \sec (c+d x)-4 b (A b-a B) \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx}{3 a \left (a^2-b^2\right )}\\ &=\frac{b (A b-a B) \cos (c+d x) \sin (c+d x)}{3 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac{b \left (10 a^2 A b-5 A b^3-7 a^3 B+2 a b^2 B\right ) \cos (c+d x) \sin (c+d x)}{6 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac{\int \frac{\cos ^2(c+d x) \left (2 \left (3 a^4 A-18 a^2 A b^2+10 A b^4+9 a^3 b B-4 a b^3 B\right )-2 a \left (6 a^2 A b-A b^3-3 a^3 B-2 a b^2 B\right ) \sec (c+d x)+3 b \left (10 a^2 A b-5 A b^3-7 a^3 B+2 a b^2 B\right ) \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^2} \, dx}{6 a^2 \left (a^2-b^2\right )^2}\\ &=\frac{b (A b-a B) \cos (c+d x) \sin (c+d x)}{3 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac{b \left (10 a^2 A b-5 A b^3-7 a^3 B+2 a b^2 B\right ) \cos (c+d x) \sin (c+d x)}{6 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac{b \left (48 a^4 A b-53 a^2 A b^3+20 A b^5-27 a^5 B+20 a^3 b^2 B-8 a b^4 B\right ) \cos (c+d x) \sin (c+d x)}{6 a^3 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}-\frac{\int \frac{\cos ^2(c+d x) \left (-6 \left (a^6 A-23 a^4 A b^2+27 a^2 A b^4-10 A b^6+12 a^5 b B-11 a^3 b^3 B+4 a b^5 B\right )+a \left (18 a^4 A b-8 a^2 A b^3+5 A b^5-6 a^5 B-7 a^3 b^2 B-2 a b^4 B\right ) \sec (c+d x)-2 b \left (48 a^4 A b-53 a^2 A b^3+20 A b^5-27 a^5 B+20 a^3 b^2 B-8 a b^4 B\right ) \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx}{6 a^3 \left (a^2-b^2\right )^3}\\ &=\frac{\left (a^6 A-23 a^4 A b^2+27 a^2 A b^4-10 A b^6+12 a^5 b B-11 a^3 b^3 B+4 a b^5 B\right ) \cos (c+d x) \sin (c+d x)}{2 a^4 \left (a^2-b^2\right )^3 d}+\frac{b (A b-a B) \cos (c+d x) \sin (c+d x)}{3 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac{b \left (10 a^2 A b-5 A b^3-7 a^3 B+2 a b^2 B\right ) \cos (c+d x) \sin (c+d x)}{6 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac{b \left (48 a^4 A b-53 a^2 A b^3+20 A b^5-27 a^5 B+20 a^3 b^2 B-8 a b^4 B\right ) \cos (c+d x) \sin (c+d x)}{6 a^3 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}+\frac{\int \frac{\cos (c+d x) \left (-2 \left (24 a^6 A b-146 a^4 A b^3+167 a^2 A b^5-60 A b^7-6 a^7 B+65 a^5 b^2 B-68 a^3 b^4 B+24 a b^6 B\right )+2 a \left (3 a^6 A+27 a^4 A b^2-25 a^2 A b^4+10 A b^6-18 a^5 b B+7 a^3 b^3 B-4 a b^5 B\right ) \sec (c+d x)+6 b \left (a^6 A-23 a^4 A b^2+27 a^2 A b^4-10 A b^6+12 a^5 b B-11 a^3 b^3 B+4 a b^5 B\right ) \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx}{12 a^4 \left (a^2-b^2\right )^3}\\ &=-\frac{\left (24 a^6 A b-146 a^4 A b^3+167 a^2 A b^5-60 A b^7-6 a^7 B+65 a^5 b^2 B-68 a^3 b^4 B+24 a b^6 B\right ) \sin (c+d x)}{6 a^5 \left (a^2-b^2\right )^3 d}+\frac{\left (a^6 A-23 a^4 A b^2+27 a^2 A b^4-10 A b^6+12 a^5 b B-11 a^3 b^3 B+4 a b^5 B\right ) \cos (c+d x) \sin (c+d x)}{2 a^4 \left (a^2-b^2\right )^3 d}+\frac{b (A b-a B) \cos (c+d x) \sin (c+d x)}{3 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac{b \left (10 a^2 A b-5 A b^3-7 a^3 B+2 a b^2 B\right ) \cos (c+d x) \sin (c+d x)}{6 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac{b \left (48 a^4 A b-53 a^2 A b^3+20 A b^5-27 a^5 B+20 a^3 b^2 B-8 a b^4 B\right ) \cos (c+d x) \sin (c+d x)}{6 a^3 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}-\frac{\int \frac{-6 \left (a^2-b^2\right )^3 \left (a^2 A+20 A b^2-8 a b B\right )-6 a b \left (a^6 A-23 a^4 A b^2+27 a^2 A b^4-10 A b^6+12 a^5 b B-11 a^3 b^3 B+4 a b^5 B\right ) \sec (c+d x)}{a+b \sec (c+d x)} \, dx}{12 a^5 \left (a^2-b^2\right )^3}\\ &=\frac{\left (a^2 A+20 A b^2-8 a b B\right ) x}{2 a^6}-\frac{\left (24 a^6 A b-146 a^4 A b^3+167 a^2 A b^5-60 A b^7-6 a^7 B+65 a^5 b^2 B-68 a^3 b^4 B+24 a b^6 B\right ) \sin (c+d x)}{6 a^5 \left (a^2-b^2\right )^3 d}+\frac{\left (a^6 A-23 a^4 A b^2+27 a^2 A b^4-10 A b^6+12 a^5 b B-11 a^3 b^3 B+4 a b^5 B\right ) \cos (c+d x) \sin (c+d x)}{2 a^4 \left (a^2-b^2\right )^3 d}+\frac{b (A b-a B) \cos (c+d x) \sin (c+d x)}{3 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac{b \left (10 a^2 A b-5 A b^3-7 a^3 B+2 a b^2 B\right ) \cos (c+d x) \sin (c+d x)}{6 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac{b \left (48 a^4 A b-53 a^2 A b^3+20 A b^5-27 a^5 B+20 a^3 b^2 B-8 a b^4 B\right ) \cos (c+d x) \sin (c+d x)}{6 a^3 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}-\frac{\left (b^2 \left (40 a^6 A b-84 a^4 A b^3+69 a^2 A b^5-20 A b^7-20 a^7 B+35 a^5 b^2 B-28 a^3 b^4 B+8 a b^6 B\right )\right ) \int \frac{\sec (c+d x)}{a+b \sec (c+d x)} \, dx}{2 a^6 \left (a^2-b^2\right )^3}\\ &=\frac{\left (a^2 A+20 A b^2-8 a b B\right ) x}{2 a^6}-\frac{\left (24 a^6 A b-146 a^4 A b^3+167 a^2 A b^5-60 A b^7-6 a^7 B+65 a^5 b^2 B-68 a^3 b^4 B+24 a b^6 B\right ) \sin (c+d x)}{6 a^5 \left (a^2-b^2\right )^3 d}+\frac{\left (a^6 A-23 a^4 A b^2+27 a^2 A b^4-10 A b^6+12 a^5 b B-11 a^3 b^3 B+4 a b^5 B\right ) \cos (c+d x) \sin (c+d x)}{2 a^4 \left (a^2-b^2\right )^3 d}+\frac{b (A b-a B) \cos (c+d x) \sin (c+d x)}{3 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac{b \left (10 a^2 A b-5 A b^3-7 a^3 B+2 a b^2 B\right ) \cos (c+d x) \sin (c+d x)}{6 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac{b \left (48 a^4 A b-53 a^2 A b^3+20 A b^5-27 a^5 B+20 a^3 b^2 B-8 a b^4 B\right ) \cos (c+d x) \sin (c+d x)}{6 a^3 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}-\frac{\left (b \left (40 a^6 A b-84 a^4 A b^3+69 a^2 A b^5-20 A b^7-20 a^7 B+35 a^5 b^2 B-28 a^3 b^4 B+8 a b^6 B\right )\right ) \int \frac{1}{1+\frac{a \cos (c+d x)}{b}} \, dx}{2 a^6 \left (a^2-b^2\right )^3}\\ &=\frac{\left (a^2 A+20 A b^2-8 a b B\right ) x}{2 a^6}-\frac{\left (24 a^6 A b-146 a^4 A b^3+167 a^2 A b^5-60 A b^7-6 a^7 B+65 a^5 b^2 B-68 a^3 b^4 B+24 a b^6 B\right ) \sin (c+d x)}{6 a^5 \left (a^2-b^2\right )^3 d}+\frac{\left (a^6 A-23 a^4 A b^2+27 a^2 A b^4-10 A b^6+12 a^5 b B-11 a^3 b^3 B+4 a b^5 B\right ) \cos (c+d x) \sin (c+d x)}{2 a^4 \left (a^2-b^2\right )^3 d}+\frac{b (A b-a B) \cos (c+d x) \sin (c+d x)}{3 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac{b \left (10 a^2 A b-5 A b^3-7 a^3 B+2 a b^2 B\right ) \cos (c+d x) \sin (c+d x)}{6 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac{b \left (48 a^4 A b-53 a^2 A b^3+20 A b^5-27 a^5 B+20 a^3 b^2 B-8 a b^4 B\right ) \cos (c+d x) \sin (c+d x)}{6 a^3 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}-\frac{\left (b \left (40 a^6 A b-84 a^4 A b^3+69 a^2 A b^5-20 A b^7-20 a^7 B+35 a^5 b^2 B-28 a^3 b^4 B+8 a b^6 B\right )\right ) \operatorname{Subst}\left (\int \frac{1}{1+\frac{a}{b}+\left (1-\frac{a}{b}\right ) x^2} \, dx,x,\tan \left (\frac{1}{2} (c+d x)\right )\right )}{a^6 \left (a^2-b^2\right )^3 d}\\ &=\frac{\left (a^2 A+20 A b^2-8 a b B\right ) x}{2 a^6}-\frac{b^2 \left (40 a^6 A b-84 a^4 A b^3+69 a^2 A b^5-20 A b^7-20 a^7 B+35 a^5 b^2 B-28 a^3 b^4 B+8 a b^6 B\right ) \tanh ^{-1}\left (\frac{\sqrt{a-b} \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a+b}}\right )}{a^6 (a-b)^{7/2} (a+b)^{7/2} d}-\frac{\left (24 a^6 A b-146 a^4 A b^3+167 a^2 A b^5-60 A b^7-6 a^7 B+65 a^5 b^2 B-68 a^3 b^4 B+24 a b^6 B\right ) \sin (c+d x)}{6 a^5 \left (a^2-b^2\right )^3 d}+\frac{\left (a^6 A-23 a^4 A b^2+27 a^2 A b^4-10 A b^6+12 a^5 b B-11 a^3 b^3 B+4 a b^5 B\right ) \cos (c+d x) \sin (c+d x)}{2 a^4 \left (a^2-b^2\right )^3 d}+\frac{b (A b-a B) \cos (c+d x) \sin (c+d x)}{3 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac{b \left (10 a^2 A b-5 A b^3-7 a^3 B+2 a b^2 B\right ) \cos (c+d x) \sin (c+d x)}{6 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac{b \left (48 a^4 A b-53 a^2 A b^3+20 A b^5-27 a^5 B+20 a^3 b^2 B-8 a b^4 B\right ) \cos (c+d x) \sin (c+d x)}{6 a^3 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}\\ \end{align*}
Mathematica [B] time = 5.8241, size = 1452, normalized size = 2.7 \[ \frac{\frac{12 A c \cos (3 (c+d x)) a^{11}+12 A d x \cos (3 (c+d x)) a^{11}+6 A \sin (c+d x) a^{11}+24 B \sin (2 (c+d x)) a^{11}+9 A \sin (3 (c+d x)) a^{11}+12 B \sin (4 (c+d x)) a^{11}+3 A \sin (5 (c+d x)) a^{11}+72 A b c a^{10}+72 A b d x a^{10}-96 b B c \cos (3 (c+d x)) a^{10}-96 b B d x \cos (3 (c+d x)) a^{10}+72 b B \sin (c+d x) a^{10}-60 A b \sin (2 (c+d x)) a^{10}+72 b B \sin (3 (c+d x)) a^{10}-30 A b \sin (4 (c+d x)) a^{10}-576 b^2 B c a^9-576 b^2 B d x a^9+204 A b^2 c \cos (3 (c+d x)) a^9+204 A b^2 d x \cos (3 (c+d x)) a^9-270 A b^2 \sin (c+d x) a^9+72 b^2 B \sin (2 (c+d x)) a^9-279 A b^2 \sin (3 (c+d x)) a^9-36 b^2 B \sin (4 (c+d x)) a^9-9 A b^2 \sin (5 (c+d x)) a^9+1272 A b^3 c a^8+1272 A b^3 d x a^8+288 b^3 B c \cos (3 (c+d x)) a^8+288 b^3 B d x \cos (3 (c+d x)) a^8-360 b^3 B \sin (c+d x) a^8-372 A b^3 \sin (2 (c+d x)) a^8-456 b^3 B \sin (3 (c+d x)) a^8+90 A b^3 \sin (4 (c+d x)) a^8+1344 b^4 B c a^7+1344 b^4 B d x a^7-684 A b^4 c \cos (3 (c+d x)) a^7-684 A b^4 d x \cos (3 (c+d x)) a^7+750 A b^4 \sin (c+d x) a^7-1200 b^4 B \sin (2 (c+d x)) a^7+1143 A b^4 \sin (3 (c+d x)) a^7+36 b^4 B \sin (4 (c+d x)) a^7+9 A b^4 \sin (5 (c+d x)) a^7-3288 A b^5 c a^6-3288 A b^5 d x a^6-288 b^5 B c \cos (3 (c+d x)) a^6-288 b^5 B d x \cos (3 (c+d x)) a^6-540 b^5 B \sin (c+d x) a^6+2772 A b^5 \sin (2 (c+d x)) a^6+500 b^5 B \sin (3 (c+d x)) a^6-90 A b^5 \sin (4 (c+d x)) a^6-576 b^6 B c a^5-576 b^6 B d x a^5+708 A b^6 c \cos (3 (c+d x)) a^5+708 A b^6 d x \cos (3 (c+d x)) a^5+1086 A b^6 \sin (c+d x) a^5+1344 b^6 B \sin (2 (c+d x)) a^5-1253 A b^6 \sin (3 (c+d x)) a^5-12 b^6 B \sin (4 (c+d x)) a^5-3 A b^6 \sin (5 (c+d x)) a^5+1512 A b^7 c a^4+1512 A b^7 d x a^4+96 b^7 B c \cos (3 (c+d x)) a^4+96 b^7 B d x \cos (3 (c+d x)) a^4+912 b^7 B \sin (c+d x) a^4-3300 A b^7 \sin (2 (c+d x)) a^4-176 b^7 B \sin (3 (c+d x)) a^4+30 A b^7 \sin (4 (c+d x)) a^4-576 b^8 B c a^3-576 b^8 B d x a^3-240 A b^8 c \cos (3 (c+d x)) a^3-240 A b^8 d x \cos (3 (c+d x)) a^3-2232 A b^8 \sin (c+d x) a^3-480 b^8 B \sin (2 (c+d x)) a^3+440 A b^8 \sin (3 (c+d x)) a^3+1392 A b^9 c a^2+1392 A b^9 d x a^2+72 b \left (a^2-b^2\right )^3 \left (A a^2-8 b B a+20 A b^2\right ) (c+d x) \cos (2 (c+d x)) a^2-384 b^9 B \sin (c+d x) a^2+1200 A b^9 \sin (2 (c+d x)) a^2+384 b^{10} B c a+384 b^{10} B d x a+36 \left (a^2-b^2\right )^3 \left (a^2+4 b^2\right ) \left (A a^2-8 b B a+20 A b^2\right ) (c+d x) \cos (c+d x) a+960 A b^{10} \sin (c+d x) a-960 A b^{11} c-960 A b^{11} d x}{\left (a^2-b^2\right )^3 (b+a \cos (c+d x))^3}-\frac{96 b^2 \left (20 B a^7-40 A b a^6-35 b^2 B a^5+84 A b^3 a^4+28 b^4 B a^3-69 A b^5 a^2-8 b^6 B a+20 A b^7\right ) \tanh ^{-1}\left (\frac{(b-a) \tan \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2-b^2}}\right )}{\left (a^2-b^2\right )^{7/2}}}{96 a^6 d} \]
Antiderivative was successfully verified.
[In]
Integrate[(Cos[c + d*x]^2*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^4,x]
[Out]
((-96*b^2*(-40*a^6*A*b + 84*a^4*A*b^3 - 69*a^2*A*b^5 + 20*A*b^7 + 20*a^7*B - 35*a^5*b^2*B + 28*a^3*b^4*B - 8*a
*b^6*B)*ArcTanh[((-a + b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^2 - b^2)^(7/2) + (72*a^10*A*b*c + 1272*a^8*A*
b^3*c - 3288*a^6*A*b^5*c + 1512*a^4*A*b^7*c + 1392*a^2*A*b^9*c - 960*A*b^11*c - 576*a^9*b^2*B*c + 1344*a^7*b^4
*B*c - 576*a^5*b^6*B*c - 576*a^3*b^8*B*c + 384*a*b^10*B*c + 72*a^10*A*b*d*x + 1272*a^8*A*b^3*d*x - 3288*a^6*A*
b^5*d*x + 1512*a^4*A*b^7*d*x + 1392*a^2*A*b^9*d*x - 960*A*b^11*d*x - 576*a^9*b^2*B*d*x + 1344*a^7*b^4*B*d*x -
576*a^5*b^6*B*d*x - 576*a^3*b^8*B*d*x + 384*a*b^10*B*d*x + 36*a*(a^2 - b^2)^3*(a^2 + 4*b^2)*(a^2*A + 20*A*b^2
- 8*a*b*B)*(c + d*x)*Cos[c + d*x] + 72*a^2*b*(a^2 - b^2)^3*(a^2*A + 20*A*b^2 - 8*a*b*B)*(c + d*x)*Cos[2*(c + d
*x)] + 12*a^11*A*c*Cos[3*(c + d*x)] + 204*a^9*A*b^2*c*Cos[3*(c + d*x)] - 684*a^7*A*b^4*c*Cos[3*(c + d*x)] + 70
8*a^5*A*b^6*c*Cos[3*(c + d*x)] - 240*a^3*A*b^8*c*Cos[3*(c + d*x)] - 96*a^10*b*B*c*Cos[3*(c + d*x)] + 288*a^8*b
^3*B*c*Cos[3*(c + d*x)] - 288*a^6*b^5*B*c*Cos[3*(c + d*x)] + 96*a^4*b^7*B*c*Cos[3*(c + d*x)] + 12*a^11*A*d*x*C
os[3*(c + d*x)] + 204*a^9*A*b^2*d*x*Cos[3*(c + d*x)] - 684*a^7*A*b^4*d*x*Cos[3*(c + d*x)] + 708*a^5*A*b^6*d*x*
Cos[3*(c + d*x)] - 240*a^3*A*b^8*d*x*Cos[3*(c + d*x)] - 96*a^10*b*B*d*x*Cos[3*(c + d*x)] + 288*a^8*b^3*B*d*x*C
os[3*(c + d*x)] - 288*a^6*b^5*B*d*x*Cos[3*(c + d*x)] + 96*a^4*b^7*B*d*x*Cos[3*(c + d*x)] + 6*a^11*A*Sin[c + d*
x] - 270*a^9*A*b^2*Sin[c + d*x] + 750*a^7*A*b^4*Sin[c + d*x] + 1086*a^5*A*b^6*Sin[c + d*x] - 2232*a^3*A*b^8*Si
n[c + d*x] + 960*a*A*b^10*Sin[c + d*x] + 72*a^10*b*B*Sin[c + d*x] - 360*a^8*b^3*B*Sin[c + d*x] - 540*a^6*b^5*B
*Sin[c + d*x] + 912*a^4*b^7*B*Sin[c + d*x] - 384*a^2*b^9*B*Sin[c + d*x] - 60*a^10*A*b*Sin[2*(c + d*x)] - 372*a
^8*A*b^3*Sin[2*(c + d*x)] + 2772*a^6*A*b^5*Sin[2*(c + d*x)] - 3300*a^4*A*b^7*Sin[2*(c + d*x)] + 1200*a^2*A*b^9
*Sin[2*(c + d*x)] + 24*a^11*B*Sin[2*(c + d*x)] + 72*a^9*b^2*B*Sin[2*(c + d*x)] - 1200*a^7*b^4*B*Sin[2*(c + d*x
)] + 1344*a^5*b^6*B*Sin[2*(c + d*x)] - 480*a^3*b^8*B*Sin[2*(c + d*x)] + 9*a^11*A*Sin[3*(c + d*x)] - 279*a^9*A*
b^2*Sin[3*(c + d*x)] + 1143*a^7*A*b^4*Sin[3*(c + d*x)] - 1253*a^5*A*b^6*Sin[3*(c + d*x)] + 440*a^3*A*b^8*Sin[3
*(c + d*x)] + 72*a^10*b*B*Sin[3*(c + d*x)] - 456*a^8*b^3*B*Sin[3*(c + d*x)] + 500*a^6*b^5*B*Sin[3*(c + d*x)] -
176*a^4*b^7*B*Sin[3*(c + d*x)] - 30*a^10*A*b*Sin[4*(c + d*x)] + 90*a^8*A*b^3*Sin[4*(c + d*x)] - 90*a^6*A*b^5*
Sin[4*(c + d*x)] + 30*a^4*A*b^7*Sin[4*(c + d*x)] + 12*a^11*B*Sin[4*(c + d*x)] - 36*a^9*b^2*B*Sin[4*(c + d*x)]
+ 36*a^7*b^4*B*Sin[4*(c + d*x)] - 12*a^5*b^6*B*Sin[4*(c + d*x)] + 3*a^11*A*Sin[5*(c + d*x)] - 9*a^9*A*b^2*Sin[
5*(c + d*x)] + 9*a^7*A*b^4*Sin[5*(c + d*x)] - 3*a^5*A*b^6*Sin[5*(c + d*x)])/((a^2 - b^2)^3*(b + a*Cos[c + d*x]
)^3))/(96*a^6*d)
________________________________________________________________________________________
Maple [B] time = 0.148, size = 3099, normalized size = 5.8 \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(cos(d*x+c)^2*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^4,x)
[Out]
6/d*b^7/a^4/(tan(1/2*d*x+1/2*c)^2*a-tan(1/2*d*x+1/2*c)^2*b-a-b)^3/(a-b)/(a^3+3*a^2*b+3*a*b^2+b^3)*tan(1/2*d*x+
1/2*c)^5*B+20/d*b^2/(a^6-3*a^4*b^2+3*a^2*b^4-b^6)/((a+b)*(a-b))^(1/2)*arctanh((a-b)*tan(1/2*d*x+1/2*c)/((a+b)*
(a-b))^(1/2))*B*a-12/d*b^7/a^4/(tan(1/2*d*x+1/2*c)^2*a-tan(1/2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b
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)^2*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^4,x, algorithm="maxima")
[Out]
Exception raised: ValueError
________________________________________________________________________________________
Fricas [B] time = 1.56026, size = 6657, normalized size = 12.37 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)^2*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^4,x, algorithm="fricas")
[Out]
[1/12*(6*(A*a^13 - 8*B*a^12*b + 16*A*a^11*b^2 + 32*B*a^10*b^3 - 74*A*a^9*b^4 - 48*B*a^8*b^5 + 116*A*a^7*b^6 +
32*B*a^6*b^7 - 79*A*a^5*b^8 - 8*B*a^4*b^9 + 20*A*a^3*b^10)*d*x*cos(d*x + c)^3 + 18*(A*a^12*b - 8*B*a^11*b^2 +
16*A*a^10*b^3 + 32*B*a^9*b^4 - 74*A*a^8*b^5 - 48*B*a^7*b^6 + 116*A*a^6*b^7 + 32*B*a^5*b^8 - 79*A*a^4*b^9 - 8*B
*a^3*b^10 + 20*A*a^2*b^11)*d*x*cos(d*x + c)^2 + 18*(A*a^11*b^2 - 8*B*a^10*b^3 + 16*A*a^9*b^4 + 32*B*a^8*b^5 -
74*A*a^7*b^6 - 48*B*a^6*b^7 + 116*A*a^5*b^8 + 32*B*a^4*b^9 - 79*A*a^3*b^10 - 8*B*a^2*b^11 + 20*A*a*b^12)*d*x*c
os(d*x + c) + 6*(A*a^10*b^3 - 8*B*a^9*b^4 + 16*A*a^8*b^5 + 32*B*a^7*b^6 - 74*A*a^6*b^7 - 48*B*a^5*b^8 + 116*A*
a^4*b^9 + 32*B*a^3*b^10 - 79*A*a^2*b^11 - 8*B*a*b^12 + 20*A*b^13)*d*x - 3*(20*B*a^7*b^5 - 40*A*a^6*b^6 - 35*B*
a^5*b^7 + 84*A*a^4*b^8 + 28*B*a^3*b^9 - 69*A*a^2*b^10 - 8*B*a*b^11 + 20*A*b^12 + (20*B*a^10*b^2 - 40*A*a^9*b^3
- 35*B*a^8*b^4 + 84*A*a^7*b^5 + 28*B*a^6*b^6 - 69*A*a^5*b^7 - 8*B*a^4*b^8 + 20*A*a^3*b^9)*cos(d*x + c)^3 + 3*
(20*B*a^9*b^3 - 40*A*a^8*b^4 - 35*B*a^7*b^5 + 84*A*a^6*b^6 + 28*B*a^5*b^7 - 69*A*a^4*b^8 - 8*B*a^3*b^9 + 20*A*
a^2*b^10)*cos(d*x + c)^2 + 3*(20*B*a^8*b^4 - 40*A*a^7*b^5 - 35*B*a^6*b^6 + 84*A*a^5*b^7 + 28*B*a^4*b^8 - 69*A*
a^3*b^9 - 8*B*a^2*b^10 + 20*A*a*b^11)*cos(d*x + c))*sqrt(a^2 - b^2)*log((2*a*b*cos(d*x + c) - (a^2 - 2*b^2)*co
s(d*x + c)^2 - 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a)*sin(d*x + c) + 2*a^2 - b^2)/(a^2*cos(d*x + c)^2 + 2*a*b*
cos(d*x + c) + b^2)) + 2*(6*B*a^10*b^3 - 24*A*a^9*b^4 - 71*B*a^8*b^5 + 170*A*a^7*b^6 + 133*B*a^6*b^7 - 313*A*a
^5*b^8 - 92*B*a^4*b^9 + 227*A*a^3*b^10 + 24*B*a^2*b^11 - 60*A*a*b^12 + 3*(A*a^13 - 4*A*a^11*b^2 + 6*A*a^9*b^4
- 4*A*a^7*b^6 + A*a^5*b^8)*cos(d*x + c)^4 + 3*(2*B*a^13 - 5*A*a^12*b - 8*B*a^11*b^2 + 20*A*a^10*b^3 + 12*B*a^9
*b^4 - 30*A*a^8*b^5 - 8*B*a^7*b^6 + 20*A*a^6*b^7 + 2*B*a^5*b^8 - 5*A*a^4*b^9)*cos(d*x + c)^3 + (18*B*a^12*b -
63*A*a^11*b^2 - 132*B*a^10*b^3 + 342*A*a^9*b^4 + 239*B*a^8*b^5 - 590*A*a^7*b^6 - 169*B*a^6*b^7 + 421*A*a^5*b^8
+ 44*B*a^4*b^9 - 110*A*a^3*b^10)*cos(d*x + c)^2 + 3*(6*B*a^11*b^2 - 23*A*a^10*b^3 - 59*B*a^9*b^4 + 146*A*a^8*
b^5 + 110*B*a^7*b^6 - 263*A*a^6*b^7 - 77*B*a^5*b^8 + 190*A*a^4*b^9 + 20*B*a^3*b^10 - 50*A*a^2*b^11)*cos(d*x +
c))*sin(d*x + c))/((a^17 - 4*a^15*b^2 + 6*a^13*b^4 - 4*a^11*b^6 + a^9*b^8)*d*cos(d*x + c)^3 + 3*(a^16*b - 4*a^
14*b^3 + 6*a^12*b^5 - 4*a^10*b^7 + a^8*b^9)*d*cos(d*x + c)^2 + 3*(a^15*b^2 - 4*a^13*b^4 + 6*a^11*b^6 - 4*a^9*b
^8 + a^7*b^10)*d*cos(d*x + c) + (a^14*b^3 - 4*a^12*b^5 + 6*a^10*b^7 - 4*a^8*b^9 + a^6*b^11)*d), 1/6*(3*(A*a^13
- 8*B*a^12*b + 16*A*a^11*b^2 + 32*B*a^10*b^3 - 74*A*a^9*b^4 - 48*B*a^8*b^5 + 116*A*a^7*b^6 + 32*B*a^6*b^7 - 7
9*A*a^5*b^8 - 8*B*a^4*b^9 + 20*A*a^3*b^10)*d*x*cos(d*x + c)^3 + 9*(A*a^12*b - 8*B*a^11*b^2 + 16*A*a^10*b^3 + 3
2*B*a^9*b^4 - 74*A*a^8*b^5 - 48*B*a^7*b^6 + 116*A*a^6*b^7 + 32*B*a^5*b^8 - 79*A*a^4*b^9 - 8*B*a^3*b^10 + 20*A*
a^2*b^11)*d*x*cos(d*x + c)^2 + 9*(A*a^11*b^2 - 8*B*a^10*b^3 + 16*A*a^9*b^4 + 32*B*a^8*b^5 - 74*A*a^7*b^6 - 48*
B*a^6*b^7 + 116*A*a^5*b^8 + 32*B*a^4*b^9 - 79*A*a^3*b^10 - 8*B*a^2*b^11 + 20*A*a*b^12)*d*x*cos(d*x + c) + 3*(A
*a^10*b^3 - 8*B*a^9*b^4 + 16*A*a^8*b^5 + 32*B*a^7*b^6 - 74*A*a^6*b^7 - 48*B*a^5*b^8 + 116*A*a^4*b^9 + 32*B*a^3
*b^10 - 79*A*a^2*b^11 - 8*B*a*b^12 + 20*A*b^13)*d*x + 3*(20*B*a^7*b^5 - 40*A*a^6*b^6 - 35*B*a^5*b^7 + 84*A*a^4
*b^8 + 28*B*a^3*b^9 - 69*A*a^2*b^10 - 8*B*a*b^11 + 20*A*b^12 + (20*B*a^10*b^2 - 40*A*a^9*b^3 - 35*B*a^8*b^4 +
84*A*a^7*b^5 + 28*B*a^6*b^6 - 69*A*a^5*b^7 - 8*B*a^4*b^8 + 20*A*a^3*b^9)*cos(d*x + c)^3 + 3*(20*B*a^9*b^3 - 40
*A*a^8*b^4 - 35*B*a^7*b^5 + 84*A*a^6*b^6 + 28*B*a^5*b^7 - 69*A*a^4*b^8 - 8*B*a^3*b^9 + 20*A*a^2*b^10)*cos(d*x
+ c)^2 + 3*(20*B*a^8*b^4 - 40*A*a^7*b^5 - 35*B*a^6*b^6 + 84*A*a^5*b^7 + 28*B*a^4*b^8 - 69*A*a^3*b^9 - 8*B*a^2*
b^10 + 20*A*a*b^11)*cos(d*x + c))*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*cos(d*x + c) + a)/((a^2 - b^2)*
sin(d*x + c))) + (6*B*a^10*b^3 - 24*A*a^9*b^4 - 71*B*a^8*b^5 + 170*A*a^7*b^6 + 133*B*a^6*b^7 - 313*A*a^5*b^8 -
92*B*a^4*b^9 + 227*A*a^3*b^10 + 24*B*a^2*b^11 - 60*A*a*b^12 + 3*(A*a^13 - 4*A*a^11*b^2 + 6*A*a^9*b^4 - 4*A*a^
7*b^6 + A*a^5*b^8)*cos(d*x + c)^4 + 3*(2*B*a^13 - 5*A*a^12*b - 8*B*a^11*b^2 + 20*A*a^10*b^3 + 12*B*a^9*b^4 - 3
0*A*a^8*b^5 - 8*B*a^7*b^6 + 20*A*a^6*b^7 + 2*B*a^5*b^8 - 5*A*a^4*b^9)*cos(d*x + c)^3 + (18*B*a^12*b - 63*A*a^1
1*b^2 - 132*B*a^10*b^3 + 342*A*a^9*b^4 + 239*B*a^8*b^5 - 590*A*a^7*b^6 - 169*B*a^6*b^7 + 421*A*a^5*b^8 + 44*B*
a^4*b^9 - 110*A*a^3*b^10)*cos(d*x + c)^2 + 3*(6*B*a^11*b^2 - 23*A*a^10*b^3 - 59*B*a^9*b^4 + 146*A*a^8*b^5 + 11
0*B*a^7*b^6 - 263*A*a^6*b^7 - 77*B*a^5*b^8 + 190*A*a^4*b^9 + 20*B*a^3*b^10 - 50*A*a^2*b^11)*cos(d*x + c))*sin(
d*x + c))/((a^17 - 4*a^15*b^2 + 6*a^13*b^4 - 4*a^11*b^6 + a^9*b^8)*d*cos(d*x + c)^3 + 3*(a^16*b - 4*a^14*b^3 +
6*a^12*b^5 - 4*a^10*b^7 + a^8*b^9)*d*cos(d*x + c)^2 + 3*(a^15*b^2 - 4*a^13*b^4 + 6*a^11*b^6 - 4*a^9*b^8 + a^7
*b^10)*d*cos(d*x + c) + (a^14*b^3 - 4*a^12*b^5 + 6*a^10*b^7 - 4*a^8*b^9 + a^6*b^11)*d)]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)**2*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))**4,x)
[Out]
Timed out
________________________________________________________________________________________
Giac [B] time = 1.63385, size = 1420, normalized size = 2.64 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)^2*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^4,x, algorithm="giac")
[Out]
1/6*(6*(20*B*a^7*b^2 - 40*A*a^6*b^3 - 35*B*a^5*b^4 + 84*A*a^4*b^5 + 28*B*a^3*b^6 - 69*A*a^2*b^7 - 8*B*a*b^8 +
20*A*b^9)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x
+ 1/2*c))/sqrt(-a^2 + b^2)))/((a^12 - 3*a^10*b^2 + 3*a^8*b^4 - a^6*b^6)*sqrt(-a^2 + b^2)) + 2*(60*B*a^7*b^3*ta
n(1/2*d*x + 1/2*c)^5 - 90*A*a^6*b^4*tan(1/2*d*x + 1/2*c)^5 - 105*B*a^6*b^4*tan(1/2*d*x + 1/2*c)^5 + 162*A*a^5*
b^5*tan(1/2*d*x + 1/2*c)^5 - 24*B*a^5*b^5*tan(1/2*d*x + 1/2*c)^5 + 48*A*a^4*b^6*tan(1/2*d*x + 1/2*c)^5 + 117*B
*a^4*b^6*tan(1/2*d*x + 1/2*c)^5 - 213*A*a^3*b^7*tan(1/2*d*x + 1/2*c)^5 - 24*B*a^3*b^7*tan(1/2*d*x + 1/2*c)^5 +
48*A*a^2*b^8*tan(1/2*d*x + 1/2*c)^5 - 42*B*a^2*b^8*tan(1/2*d*x + 1/2*c)^5 + 81*A*a*b^9*tan(1/2*d*x + 1/2*c)^5
+ 18*B*a*b^9*tan(1/2*d*x + 1/2*c)^5 - 36*A*b^10*tan(1/2*d*x + 1/2*c)^5 - 120*B*a^7*b^3*tan(1/2*d*x + 1/2*c)^3
+ 180*A*a^6*b^4*tan(1/2*d*x + 1/2*c)^3 + 236*B*a^5*b^5*tan(1/2*d*x + 1/2*c)^3 - 392*A*a^4*b^6*tan(1/2*d*x + 1
/2*c)^3 - 152*B*a^3*b^7*tan(1/2*d*x + 1/2*c)^3 + 284*A*a^2*b^8*tan(1/2*d*x + 1/2*c)^3 + 36*B*a*b^9*tan(1/2*d*x
+ 1/2*c)^3 - 72*A*b^10*tan(1/2*d*x + 1/2*c)^3 + 60*B*a^7*b^3*tan(1/2*d*x + 1/2*c) - 90*A*a^6*b^4*tan(1/2*d*x
+ 1/2*c) + 105*B*a^6*b^4*tan(1/2*d*x + 1/2*c) - 162*A*a^5*b^5*tan(1/2*d*x + 1/2*c) - 24*B*a^5*b^5*tan(1/2*d*x
+ 1/2*c) + 48*A*a^4*b^6*tan(1/2*d*x + 1/2*c) - 117*B*a^4*b^6*tan(1/2*d*x + 1/2*c) + 213*A*a^3*b^7*tan(1/2*d*x
+ 1/2*c) - 24*B*a^3*b^7*tan(1/2*d*x + 1/2*c) + 48*A*a^2*b^8*tan(1/2*d*x + 1/2*c) + 42*B*a^2*b^8*tan(1/2*d*x +
1/2*c) - 81*A*a*b^9*tan(1/2*d*x + 1/2*c) + 18*B*a*b^9*tan(1/2*d*x + 1/2*c) - 36*A*b^10*tan(1/2*d*x + 1/2*c))/(
(a^11 - 3*a^9*b^2 + 3*a^7*b^4 - a^5*b^6)*(a*tan(1/2*d*x + 1/2*c)^2 - b*tan(1/2*d*x + 1/2*c)^2 - a - b)^3) + 3*
(A*a^2 - 8*B*a*b + 20*A*b^2)*(d*x + c)/a^6 - 6*(A*a*tan(1/2*d*x + 1/2*c)^3 - 2*B*a*tan(1/2*d*x + 1/2*c)^3 + 8*
A*b*tan(1/2*d*x + 1/2*c)^3 - A*a*tan(1/2*d*x + 1/2*c) - 2*B*a*tan(1/2*d*x + 1/2*c) + 8*A*b*tan(1/2*d*x + 1/2*c
))/((tan(1/2*d*x + 1/2*c)^2 + 1)^2*a^5))/d